home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2637 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: mail2news.demon.co.uk!hpl3sn03.cern.ch
  2. From: Dan Pop <danpop@mail.cern.ch>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: **** delay() function broken in Turbo C 2.0 ****
  5. Date: Mon, 22 Jan 1996 21:34:05 +0100
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <9601222034.AA19285@dxmint.cern.ch>
  8. References: <dkingma.96.000CE835@vt.edu>
  9. X-NNTP-Posting-Host: hpl3sn03.cern.ch
  10. X-Newsreader: NN version 6.5.0 #7 (NOV)
  11. X-Mail2News-Path: dxmint.cern.ch!hpl3sn03.cern.ch
  12.  
  13. dkingma@vt.edu (Dave Kingma) writes:
  14.  
  15. >I've put up with it long enough.. now I need an answer.  I
  16. >have been using Borland's Turbo C v2.0 for years now, and
  17. >have problems with the delay() function.  
  18.  
  19. There is no such function in the standard C library.
  20.  
  21. >The delay function
  22. >should be machine speed independent (put 1 ms in, get 1 ms
  23. >of delay). 
  24.  
  25. If you say so.
  26.  
  27. >It works OK as long as the turbo switch is not
  28. >pressed on 486 machines. 
  29.  
  30. I couldn't find any reference to turbo switches and 486 machines in my
  31. ANSI C reference book.
  32.  
  33. >Once you press the turbo switch,
  34. >all bets are off.
  35.  
  36. Then don't press that bloody switch.
  37.  
  38. >At that point, it's very dependent on
  39. >clock speed.  Are there any patches that fix this?  Borland
  40. >doesn't seem to want to offer free support on this product
  41. >and I don't see anything on their FTP site.  Are there other
  42. >workarounds?
  43.  
  44. 1. c.l.c is not for system/compiler specific topics.  Go to 
  45.    comp.os.msdos.programmer with this kind of questions.
  46.  
  47. 2. Learn how the 8254 timer/counter chip works and implement delay()
  48.    yourself.  It's fairly easy (but not trivial).  The frequency of the
  49.    input signal used by the channel responsible for the real time clock
  50.    is 1.1925 MHz (whether the infamous turbo switch is pressed or not).
  51.  
  52. Dan
  53. -- 
  54. Dan Pop
  55. CERN, CN Division
  56. Email: danpop@mail.cern.ch 
  57. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  58.